home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1994 September
/
64er_Magazin_94-09_1994_Markt__Technik_de_Side_A.d64
/
tier raten.kurs3
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
127 lines
10 rem ******************************
20 rem * tiere raten *
30 rem ******************************
40 :
50 :
60 rem" [166][166][166][166][166][166][166][166][166] listing 3 [166][166][166][166][166][166][166][166][166][166]
70 :
75 [143]" orlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen^
76 rem" [194] vorgaben (100) [194]
77 [143]" /lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
80 :
100 dim w$(200)
110 w$(0) = "0"
170 :
180 rem" [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
181 [143]" peek liste laden (200) peek
182 rem" [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]
190 :
200 [159] 1,8,2, "tierliste,s,r"
210 [132]1, w$(0)
220 [129] z [178] 1 [164] ([197](w$(0))[171]1)
230 : [132]1, w$(z)
240 [130] z
250 [160] 1
270 :
280 [143]" orlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen^
281 rem" [194] start (300) [194]
282 [143]" /lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
290 :
300 m = 1
310 print "denke dir bitte ein tier aus, das ich" chr$(13) "erraten muss."
320 input "bist du bereit (ja/nein) "; a$
330 if left$(a$,1) <> "j" then 320
340 if w$(0) <> "0" then 400
350 print "ich kenne noch kein tier"chr$(13)"an welches tier hast du gedacht"
360 input t$
370 w$(0) = "2"
380 w$(1) = "r " + t$
390 goto 970
393 :
394 rem" [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
396 [143]" peek u oder r ? (400) peek
397 rem" [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]
398 :
400 [139] [200] (w$(m),1) [178] "u" [167] 500
410 [139] [200] (w$(m),1) [178] "r" [167] 700
470 :
480 [143]" orlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen^
481 rem" [194] unterschieds-frage (500) [194]
482 [143]" /lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
490 :
500 u$ = w$(m)
510 for z = 3 to len (u$)
520 : if mid$ (u$,z,1) = "*" then 550
530 : print mid$ (u$,z,1);
540 next z
550 input " (ja/nein)"; a$
560 if left$ (a$,1) <> "j" and left$ (a$,1) <> "n" then 510
570 :
580 rem" [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
581 [143]" peek markierung (600) peek
582 rem" [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]
590 :
600 [129] z [178] 3 [164] [195](u$)
610 : [139] [202] (u$,z,2) [178] "*" [170] [200] (a$,1) [167] 630
620 [130] z
630 m [178] [197]([202](u$,z[170]2))
640 [137] 400
670 :
680 [143]" orlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen^
681 rem" [194] rate-frage (700) [194]
682 [143]" /lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
690 :
700 print "heisst es "; mid$ (w$(m),3);
710 input " (ja/nein)"; a$
720 if left$ (a$,1) <> "j" and left$ (a$,1) <> "n" then 700
730 if left$ (a$,1) = "j" then 1100
770 :
780 rem" [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
781 [143]" peek lernen (800) peek
782 rem" [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]
790 :
800 [153] "wie heisst das von dir ausgedachte tier"
810 [133] t$
820 [139] t$ [178] "" [167] 810
830 [153] "gib mir eine frage, die den unterschied"
840 [153] "zwischen "; t$; " und "; [202] (w$(m),3); " beschreibt"
850 [133] f$
860 [139] f$ [178] "" [167] 830
870 [153] "fuer "; t$; " waere die antwort (ja/nein) ";
880 [133] a$
890 [139] [200] (a$,1) [179][177] "j" [175] [200] (a$,1) [179][177] "n" [167] 870
894 :
895 [143]" orlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen^
896 rem" [194] platzwechsel (900) [194]
897 [143]" /lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
898 :
900 if left$ (a$,1) = "j" then b$ = "n"
910 if left$ (a$,1) = "n" then b$ = "j"
920 w = val(w$(0))
930 w$(w) = w$(m)
940 w$(w+1) = "r " + t$
950 w$(m) = "u " + f$ + "*" + left$(a$,1) + str$(w+1) + "*" + b$ + str$(w)
960 w$(0) = str$(w+2)
970 print "vielen dank. ich habe was neues gelernt."
980 :
985 rem" [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
986 [143]" peek abspeichern (1000) peek
987 rem" [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]
990 :
1000 [159] 2,8,15,"s:tierliste"
1010 [159] 1,8,2,"tierliste,s,w"
1020 [129] z [178] 0 [164] ([197](w$(0)))
1030 : [152]1, w$(z)
1040 [130] z
1050 [160] 1: [160] 2
1060 :
1070 :
1075 [143]" orlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen^
1076 rem" [194] noch einmal (1100) [194]
1077 [143]" /lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
1080 :
1100 input "soll ich noch ein tier raten (ja/nein) "; a$
1110 if left$(a$,1) = "j" then 300
1120 if left$(a$,1) = "n" then end
1130 goto 1100